<template>
  <div id="map"></div>
</template>
<script>
import AMap from "AMap";
export default {
  mounted() {
    var map = new AMap.Map('map', {
      resizeEnable: true, //是否监控地图容器尺寸变化
      zoom: 12, //初始化地图层级
      center: [114.019628, 23.033391] //初始化地图中心点
    });
    var marker = new AMap.Marker({
      icon: "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-red.png",
      position: [114.019628, 23.033391],
      offset: new AMap.Pixel(-26, -35)
    });
    marker.setMap(map);
  }
}
</script>
<style scoped>
#map {
  width: 100%;
  height: 100%;
}
</style>

